$(document).ready(function() {
    
    "use strict";
    
    
    // Setup html5 version
    $("#uploader").pluploadQueue({
        // General settings
        runtimes : 'html5,flash,silverlight,html4',
        url : "/examples/upload",
         
        chunk_size : '1mb',
        rename : true,
        dragdrop: true,
         
        filters : {
            // Maximum file size
            max_file_size : '10mb',
            // Specify what files to browse for
            mime_types: [
                {title : "Image files", extensions : "jpg,gif,png"},
                /* {title : "Zip files", extensions : "zip"} */
            ]
        },
 
        // Resize images on clientside if we can
        resize: {
            width : 200,
            height : 200,
            quality : 90,
            crop: true // crop to exact dimensions
        },
 
 
        // Flash settings
        flash_swf_url : '/admin1/assets/plugins/plupload/js/Moxie.swf',
     
        // Silverlight settings
        silverlight_xap_url : '/admin1/assets/plugins/plupload/js/Moxie.xap'
    });
	
	 plupload.addI18n({
            'Select files': '选择文件',
            'Add files to the upload queue and click the start button.': '将文件加入上传队列后按开始按钮开始上传。',
            'Filename': '文件名称',
            'Status': '状态',
            'Size': '大小',
            'Add Files': '添加文件',
            'Start Upload': '开始上传',
            'Stop Upload': '停止上传'
        });
		$('.plupload_start').attr('style', 'display:none');
});